package com.zzl.bonds.ticket.dto.myticket;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import com.zzl.bonds.ticket.dto.KeyValue;
import com.zzl.general.common.utils.DoubleSerialize;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 我的票据  我持有 转让中的 列表返回公用 返回对象
 *
 * @author : spp
 * @date : 2022/2/23 20:14
 */
@ApidocModel
@Data
public class MyTicketPage {

    @ApidocModelProperty(description = "主键")
    private String id;
    @ApidocModelProperty(description = "凭证编号")
    private String ticketNo;

    @JsonSerialize(using = DoubleSerialize.class)
    @ApidocModelProperty(description = "票据原始金额/凭证金额")
    private Double ticketAllAmount;


    @ApidocModelProperty(description = "开单方id")
    private String openEnterpriseId;
    @ApidocModelProperty(description = "开单方企业名称")
    private String openEnterpriseName;
    @ApidocModelProperty(description = "开单方社会信用代码")
    private String openSocialCreditCode;
    @ApidocModelProperty(description = "转让方id")
    private String transferEnterpriseId;
    @ApidocModelProperty(description = "转让方名称")
    private String transferEnterpriseName;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApidocModelProperty(description = "开单日期", validate = "yyyy-MM-dd")
    private Date invoiceTime;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApidocModelProperty(description = "到期日期", validate = "yyyy-MM-dd")
    private Date expireTime;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApidocModelProperty(description = "签收日期", validate = "yyyy-MM-dd")
    private Date receiptTime;
    @ApidocModelProperty(description = "金融机构Id")
    private Integer instinctyId;
    @ApidocModelProperty(description = "金融机构名称")
    private String instinctyName;

    @ApidocModelProperty(description = "剩余兑付天数")
    private String surplusCashingDays;
    private Integer ticketSource;
    @ApidocModelProperty(description = "票据来源,1:自建")
    private String ticketSourceStr;
    private Integer ticketTypeSource;
    @ApidocModelProperty(description = "票据数据来源,1:开立签收，2：转让签收，3融单留存4.转单留存，5转单失败，6融单失败")
    private String ticketTypeSourceStr;
    @ApidocModelProperty(description = "上链地址")
    private String chainAddress;

    @ApidocModelProperty(description = "付息方式")
    private Integer paymentMode;

    @ApidocModelProperty(description = "付息方式")
    private String paymentModeInfo;

    /**
     * 转让中的 字段给值 查转让表
     */
    @ApidocModelProperty(description = "签收方id")
    private String receiveEnterpriseId;
    @ApidocModelProperty(description = "签收方企业名称")
    private String receiveEnterpriseName;

    /**
     * 查转让表
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApidocModelProperty(description = "转单日期", validate = "yyyy-MM-dd")
    private Date transferTime;

    private Integer ticketStatus;

    @ApidocModelProperty(description = "凭证状态")
    private String ticketStatusStr;

    @JsonIgnore
    private String handStatus;


    @ApidocModelProperty(description = "处理状态信息悬浮")
    private String handStatusInfo;

    @ApidocModelProperty(description = "操作按钮集合")
    private List<KeyValue> operateButton;

    @JsonIgnore
    private String ticketTransferId;

    @JsonIgnore
    private String ticketOpenId;

    @ApidocModelProperty(description = "申请表Id")
    private String parentBusinessId;

    @ApidocModelProperty(description = "备注")
    private String remark;

    @ApidocModelProperty(description = "    冻结状态 0，未冻结，1已冻结")
    private Integer frozenState;


    /**
     * 新增 字段
     */
    @ApidocModelProperty(description = "所属企业id/ 持单企业id")
    private String enterpriseId;
    @ApidocModelProperty(description = "所属企业名称/  持单企业名称")
    private String enterpriseName;


    private String ticketOriginId;

    @ApidocModelProperty(description = "我的票据表/ 原始母单号")
    private String ticketOriginNo;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApidocModelProperty(description = "开单/转单/融单日期")
    private Date createTime;

}
